﻿using Sunny.UI;
using DevelopTool.Common;

namespace DevelopTool.Forms.CommonHelpers
{
    public static class AboutHelper
    {
        private static AboutForm aboutForm;

        public static void ShowAbout(string operName = "关于")
        {
            if (aboutForm == null || aboutForm.IsDisposed)
            {
                aboutForm = new AboutForm();
            }

            if (!aboutForm.Visible)
            {
                aboutForm.Show();
            }
            else
            {
                aboutForm.HandleRunningInstance(SystemEx.SW_RESTORE);//如果已经打开了，那就显示到前台
            }

            aboutForm.ShowOper(operName);
        }
    }
}
